import React from "react"
import { Navigate } from "react-router-dom"
import Home from "../pages/Home"
import Shouye from "../pages/Shouye"
import Files from "../pages/Files"
import TableAdd from "../pages/TableAdd"
import Manage from "../pages/Manage"
import UpFile from "../pages/UpFile"

const Routes = [
  {
    path: '/',
    element: <Navigate to='/home' />
  },
  {
    path: '/home',
    element: <Home />,
    children: [
      {
        path: 'shouye',
        element: <Shouye />
      },
      {
        path: 'files',
        element: <Files />
      },
      {
        path: 'add',
        element: <TableAdd />
      },
      {
        path: 'manage',
        element: <Manage />
      },
      {
        path: 'up',
        element: <UpFile />
      },
      {
        path: '/home',
        element: <Navigate to='shouye' />
      },
    ]
  }
]
export default Routes